home *** CD-ROM | disk | FTP | other *** search
/ SGI Desktop Special Edition 1.1 / SGI Desktop Special Edition 1.1.iso / dist / SoftWindows2.idb / var / tmp / swin2_exitops.sh.z / swin2_exitops.sh
Encoding:
Linux/UNIX/POSIX Shell Script  |  1995-11-13  |  2.8 KB  |  140 lines

  1. #!/bin/sh
  2. #
  3. # Set LOCALDIR based on $LANG
  4. #
  5. SWIN2HOME=$1
  6.  
  7. # Currently Supported Keyboards
  8. #
  9. # Prom indicators (only used on INDY/Indigo2/PowerIndigo2 Systems)
  10. #
  11. # fr = FRA, FR
  12. # gr = DE, DEU 
  13. # uk = GBR, GB
  14. # us = USA, US 
  15. #
  16.  
  17. case `nvram keybd` in
  18.     FRA|FR)
  19.         LOCALDIR=$SWIN2HOME/local/SGIfr
  20.     ;;
  21.     DEU|DE)
  22.                 LOCALDIR=$SWIN2HOME/local/SGIgr
  23.     ;;
  24.     GRB|GB)
  25.                 LOCALDIR=$SWIN2HOME/local/SGIuk
  26.     ;;
  27.     *)
  28.                 LOCALDIR=$SWIN2HOME/local/SGIus
  29.     ;;    
  30. esac
  31.  
  32. # This is an evil hack to deal with a preexisting 1.2 or 1.1 .hdf file in
  33. # $SWIN2HOME. We need to keep it but inst will dump it. So... we noupdate install
  34. # a junk file and a copy of it. If they aren't different, then we can delete
  35. # them, if they are then we need to rename one and dump the other.
  36. #
  37. #if  `cmp -s $SWIN2HOME/MS-WIN-311.hdf $SWIN2HOME/.MS-WIN-311.hdf`
  38. #then
  39.         # They are both junk
  40. #        rm $SWIN2HOME/MS-WIN-311.hdf
  41. #        rm $SWIN2HOME/.MS-WIN-311.hdf
  42. #else
  43.         # There was a real one left behind
  44. #        mv $SWIN2HOME/MS-WIN-311.hdf $SWIN2HOME/SAVED-MS-WIN-311.hdf
  45. #        rm $SWIN2HOME/.MS-WIN-311.hdf
  46. #fi
  47. #
  48. # If this is an IP22 then install the US INDY Keyboard
  49. #
  50. #if [ "`uname -m`" = "IP22" -o "`uname -m`" = "IP26" ]
  51. #then
  52.         # We're on an Indy
  53. #    cat $SWIN2HOME/sys.swin2config | sed -f $LOCALDIR/upd_i_keymap > $SWIN2HOME/new.swin2config
  54. #    mv $SWIN2HOME/new.swin2config $SWIN2HOME/sys.swin2config
  55. #fi
  56. #
  57. # Assume US installation (for right now)
  58. #
  59. ( cd $LOCALDIR/local ; find . -print | cpio -pud $SWIN2HOME/local )
  60.  
  61. #
  62. # Update the File Type Rules and icons
  63. #
  64. cd $rbase/usr/lib/filetype
  65. make
  66.  
  67. #
  68. # Put the icon in the catalog
  69. #
  70. if [ -x $rbase/usr/sbin/iconbookedit ]
  71. then
  72.     chroot $rbase /usr/sbin/iconbookedit -add "Category:File Name:/usr/lib/SoftWindows2/bin/SoftWindows2" -syspage Applications
  73.     chroot $rbase /usr/sbin/iconbookedit -add "Category:File Name:/usr/lib/SoftWindows2/bin/SoftWindows2" -syspage WhatsNew
  74. fi
  75.  
  76. #
  77. # Setup the fonts
  78. #
  79. $rbase/usr/bin/X11/xset +fp $SWIN2HOME/fonts/SGI
  80. $rbase/usr/bin/X11/xset fp rehash
  81.  
  82. #
  83. # Make sure there's a /CDROM and /floppy directory
  84. #
  85. mkdir /floppy 1>/dev/null 2>&1
  86. mkdir /CDROM 1>/dev/null 2>&1
  87.  
  88. #
  89. # remove any 1.2 version ids older then us
  90. #
  91. #rm $SWIN2HOME/.12000001
  92. #rm $SWIN2HOME/.12000002
  93. #rm $SWIN2HOME/.12000003
  94.  
  95. #
  96. # setup the system 4Dwmrc file
  97. #
  98. mv $rbase/usr/lib/X11/system.4Dwmrc $rbase/usr/lib/X11/system.4Dwmrc.O
  99. mv $rbase/usr/lib/X11/system.4Dwmrc.swin $rbase/usr/lib/X11/system.4Dwmrc
  100.  
  101.  
  102. #
  103. # Move new license (if any) to appropriate location
  104. #
  105. if [ -r /var/tmp/20license.dat ]; then
  106.   mv /var/tmp/20license.dat $rbase/usr/lib/SoftWindows2/FLEXlm/license.dat
  107. fi
  108.  
  109. if [ -r /var/tmp/125license.dat ]; then
  110.   mv /var/tmp/125license.dat $rbase/usr/lib/SoftWindows2/FLEXlm/125license.dat
  111. fi
  112.  
  113.  
  114. #
  115. # Clean up
  116. #
  117. rm $rbase/var/tmp/swin* 1>/dev/null 2>&1
  118. rm $rbase/var/tmp/junk 1>/dev/null 2>&1
  119. exit 0
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.